package com.chen.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.chen.pojo.User;
import com.chen.service.UserService;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xi on 2016-3-8.
 */
@Controller
@RequestMapping("/")  
class MainControllor {

	@Autowired
	private UserService userService;
    @ResponseBody
    @RequestMapping (value="getUserList")
    public List test(){
        List list=new ArrayList();
        list.add("中文");
        list.add("2");
        list.add("3");
        User user=userService.getUserById("1");
        System.out.println(user.getUserName());
        return list;
        
    }
    public String test(String s){
        return "";
    }
}
